package com.hs.li.controller;

import com.hs.dto.Constants;
import com.hs.dto.ResultBean;
import com.hs.li.pojo.CarCarrier;
import com.hs.li.pojo.CarManagement;
import com.hs.li.service.ICarCarrierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 承运商管理 前端控制器
 * </p>
 *
 * @author lhj
 * @since 2022-06-13
 */
@CrossOrigin
@RestController
@RequestMapping("/carCarrier")
public class CarCarrierController {

    @Autowired
    private ICarCarrierService carCarrierService;

    @RequestMapping("/list")
    public ResultBean queryCarCarrier(){
        List<CarCarrier> list = carCarrierService.list();

        ResultBean resultBean = new ResultBean();
        resultBean.setData(list);
        resultBean.setCode(Constants.SUCCESS_CODE);
        resultBean.setMsg("查询成功！");

        return resultBean;
    }
}
